package com.teacher.pc.controller;


import com.teacher.common.CommonResult;
import com.teacher.service.ISerialNumberService;
import com.teacher.service.impl.RedissonDistributedLocker;
import io.swagger.annotations.ApiOperation;
import org.redisson.api.RLock;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 工单号生成器 前端控制器
 * </p>
 *
 * @author zfm
 * @since 2021-08-03
 */
@RestController
@RequestMapping("/pc/serial-number")
public class SerialNumberController {

    @Autowired
    private ISerialNumberService iSerialNumberService;

    @GetMapping
    @ApiOperation("test")
    public CommonResult<String> test() {
        String serialNumber = iSerialNumberService.getSerialNumber();
        return CommonResult.success(serialNumber);
    }

}

